<%@page import="servlet.StaffappSearchResult"%>
<%@page import="Logic.Authorizer"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%
	if (session.getAttribute("name") == null) {
		response.sendRedirect("login.jsp");
	} 
%>


<!-- Declare the first header -->
<jsp:include page="t_header.jsp" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/basic.css" />
<script type="text/javascript">


function setPopup(appointmentID, event){
	
	//MyWindow=window.open('appttype_responsibilities.jsp?id='+ appointmentID,'MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=250');
	$(apptDescriptionPanel).load('appttype_responsibilities.jsp?id='+ appointmentID);
	$(apptDescriptionPanel).show();
	//var posy = event.clientY + 5;
	//var posx = event.clientX + 20;
	
	//MyWindow.moveTo(posx,posy);
}

/*$(document).ready(function() 
		{	
			$("#vpb_pop_up_background").click(function()
			{
				$("#vpb_signup_pop_up_box").hide(); */

$(document).ready(function(){

	$(apptDescriptionPanel).click(function()
	{
		$(apptDescriptionPanel).hide();
	});
});
</script>

<jsp:include page="header.html" />
<!-- Declare sidebar -->
<jsp:include page="t_sidebarappointment.jsp" />

<!-- Main Content -->
<section id="main" class="column">
	<%
		if (request.getParameter("error") != null) {
			if (request.getParameter("error").equals("1"))
				out.print("<h4 class='alert_error'>No result found.</h4>");
		}
	%>

	<%
		if (request.getParameter("error") == null) {
	%>
	<article class="module width_full">
		<header><h3>View Appointment Types</h3>
		</header>
<div id="apptDescriptionPanel" style="position:absolute;top:100px;left:100px;"></div>
		<table class="tablesorter" cellspacing="0">
			<thead>
				<tr>
					<th style="width:15%">Name</th>
					<th style="width:25%">Appointment</th>
					<th style="width:10%">Description</th>
					<th style="width:15%">Effective Date</th>
					<th style="width:15%">Approved By</th>
					<th style="width:15%"></th>
				</tr>
			</thead>
			<tbody>
				<%
						StaffappSearchResult rt = new StaffappSearchResult(out, request.getAttribute("id").toString());
						rt.doGet(request, response);
				%>
			</tbody>
		</table>




	</article>
	<%
		}
	%>



	<!-- end of content manager article -->
	<div class="spacer"></div>
</section>

<!-- Declare closing tags -->
<jsp:include page="t_footer.jsp" />